package com.bgrconsulting.stockorderentry.service.rest.impl;

import java.util.Date;
import java.util.UUID;
import javax.ws.rs.Path;
import javax.ws.rs.GET;
import javax.ws.rs.Produces;
import com.bgrconsulting.stockorderentry.service.model.RateLimitStatus;
import com.bgrconsulting.stockorderentry.service.converter.RateLimitStatusConverter;

@Path("/statuses/rest/")
public class RateLimitStatusResource {
 
 @GET
 @Produces({"application/xml", "application/json"})
 @Path("/limits") 
 public RateLimitStatusConverter getRateLimitStatus() {
	 	RateLimitStatus rls = new RateLimitStatus();
	 	
	 	rls.setLimitIntervalInSeconds(3600);
	 	rls.setOathurCustomerKey(UUID.randomUUID().toString());
	 	rls.setRequestLimit(7000);
	 	rls.setRequestRemaining(7000);
	 	rls.setResetTimeEpochSeconds(1269049052);
	 	rls.setResetTime(new Date());
	 	
	 	RateLimitStatusConverter rlsc = new RateLimitStatusConverter(rls);
	 	
	 
        return rlsc;
    }
}
